<?php

class yougoChangePasswordForm extends BaseForm {

    public function configure() {
        $this->setWidgets(array(
            'oldPassword' => new sfWidgetFormInputPassword(array('label' => 'Current password')),
            'newPassword' => new sfWidgetFormInputPassword(array('label' => 'New password')),
            'confirmedNewPassword' => new sfWidgetFormInputPassword(array('label' => 'Confirm new password')),
        ));

        $this->setValidators(array(
            'oldPassword' => new sfValidatorString(),
            'newPassword' => new sfValidatorString(),
            'confirmedNewPassword' => new sfValidatorString(),
        ));

        $this->validatorSchema->setPostValidator(new yougoChangePasswordValidator());

        $this->widgetSchema->setNameFormat('changePassword[%s]');
    }

}

?>
